package org.spice.servlet.vo.helper;

import java.lang.reflect.Field;

import javax.servlet.http.HttpServletRequest;


public 
class ValueObjectMap {

	public static 
	void set(final Object object, final HttpServletRequest request){
		Field[] fields = object.getClass().getDeclaredFields();
		for(final Field field : fields){
			try {
				field.setAccessible(true);
				request.setAttribute(object.getClass().getSimpleName().concat(",").concat(field.getName()), field.get(object));
			} catch (IllegalArgumentException e) {
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}
		}
	}
}
